package com.wmjsoft.plugins.nutzplugin.dao

/**
 * 如果我没有写注释，请提醒我
 * @program: Maternal
 * @description:
 * @author: Mr.Lee
 * @create: 2021-02-20 14:43
 */
class Selecter(private var queerSql: QueerSql) {

    fun selectFiled(vararg fields: String): Selecter {
        for (filed in fields) {
            this.queerSql.selectString!!
                .append(" " + queerSql.getTableName(queerSql.clazz).toString() + "." + filed + ",")
        }
        return this
    }


    fun where(): Wherer {
        return Wherer(this.queerSql)
    }


    fun left(clazz: Class<*>?): Joiner {
        return Joiner().init(clazz, this.queerSql, "LEFT")
    }

    fun right(clazz: Class<*>?): Joiner {
        return Joiner().init(clazz, this.queerSql, "RIGHT")
    }

    fun inner(clazz: Class<*>?): Joiner {
        return Joiner().init(clazz, this.queerSql, "INNER")
    }

}